% This file is modified by Frans Oliehoek <faolieho@science.uva.nl>
% on 2005/12/18. (original file name: beamerthemeoutersidebar.sty)
%
% This file shows (defines stuff to show) the left side bar with 'IAS'
% written in it. this is for usage with a top navigation (split style)  
% In order to correctly show the frame-title and subtitle (which  must be 
% lower when also using a top navigation bar) it redefines the frametitle
% template. This is currently set to use \paperwidth, as I am not able to 
% figure out how to get the free space (width) exactly, causing warnings
% (overfull boxes), but they can be ignored.

% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>
%
% This program can be redistributed and/or modified under the terms
% of the GNU Public License, version 2.


\newdimen\beamer@sidebarwidth
\newdimen\beamer@headheight
\usebeamerfont{frametitle}
\beamer@sidebarwidth=2.5\baselineskip
%\beamer@headheight=2.5\baselineskip
\beamer@headheight=0\baselineskip
\reset@font

\def\beamer@lefttext{left}

\DeclareOptionBeamer{hideothersubsections}[]{\beamer@nav@subsectionstyle{show/show/hide}}
\DeclareOptionBeamer{hideallsubsections}[]{\beamer@nav@subsectionstyle{hide}}

\DeclareOptionBeamer{width}{\beamer@sidebarwidth=#1}
\DeclareOptionBeamer{height}{\beamer@headheight=#1}
\DeclareOptionBeamer{left}{\def\beamer@sidebarside{left}}
\DeclareOptionBeamer{right}{\def\beamer@sidebarside{right}}
\ExecuteOptionsBeamer{left}
\ProcessOptionsBeamer


\mode<presentation>

\ifdim\beamer@headheight=0pt%incorrectly detected
  \defbeamertemplate*{frametitle}{sidebar theme}
  {%
    \nointerlineskip%
    \vskip-\beamer@headheight%
    \vskip0.3pt%
\begin{beamercolorbox}[wd=\paperwidth,ht=24pt,leftskip=5pt,rightskip=-5pt,plus1fil,vmode]{frametitle}    
    \vskip0.2em
%     \hskip.5em
    \vbox{
	{ \usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle  %\\%
  \par}%
	{%
	\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle 
 	\par}
}
      \vskip.10em%    
\end{beamercolorbox}
  }

\fi


\def\beamer@sidebarformat#1#2#3{%
  \begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode]{#2}
    \vbox{}%
    #3\par%
    \vbox{test}%
    \vskip-1.5ex%
  \end{beamercolorbox}
}

\def\beamer@sidebarformat_b#1#2#3{%
  \begin{beamercolorbox}[wd=\beamer@sidebarwidth,leftskip=#1,rightskip=1ex plus1fil,vmode]{#2}
    \vbox{}%
    #3\par%
    \vbox{}%
    \vskip-1.5ex%
  \end{beamercolorbox}
}


\defbeamertemplate*{section in sidebar}{sidebar theme}
{%
  \vbox{%
    \vskip1ex%
    \beamer@sidebarformat{3pt}{section in sidebar}{\insertsectionhead}%
  }%
}

\defbeamertemplate*{IAS_sidebar}{sidebar theme}
{%
  \vbox{%
    \vskip1ex%
    \beamer@sidebarformat_b{3pt}{section in sidebar}{IAS}%
  }%
}


\defbeamertemplate*{section in sidebar shaded}{sidebar theme}
{%
  \vbox{%
    \vskip1ex%
    \beamer@sidebarformat{3pt}{section in sidebar shaded}{\insertsectionhead}%
  }%
}

\defbeamertemplate*{subsection in sidebar}{sidebar theme}
{%
  \beamer@sidebarformat{5pt}{subsection in sidebar}{\insertsubsectionhead}%
}

\defbeamertemplate*{subsection in sidebar shaded}{sidebar theme}
{%
  \beamer@sidebarformat{5pt}{subsection in sidebar shaded}{\insertsubsectionhead}%
}


\ifdim\beamer@sidebarwidth>0pt

                                % Sidebar
  \setbeamersize{sidebar width \beamer@sidebarside=\beamer@sidebarwidth}
  \defbeamertemplate*{sidebar \beamer@sidebarside}{sidebar theme}
  {
    \beamer@tempdim=\beamer@sidebarwidth%
    \advance\beamer@tempdim by -6pt%
    \vfill
    \input{ias_text}
  }%
  
                                % Margins
  \setbeamersize{text margin left=0.5cm,text margin right=0.5cm}
\fi

\mode
<all>
